<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>注册 - 星语桥·SignFlow</title>
    <link
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
      rel="stylesheet"
    />
    <link
      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
      rel="stylesheet"
    />
    <style>
      body {
        height: 100vh;
        display: flex;
        align-items: center;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      }
      .form-signin {
        width: 100%;
        max-width: 480px;
        padding: 40px;
        margin: auto;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
      }
      .form-signin .logo {
        font-size: 4rem;
        color: #4a69bd;
        margin-bottom: 1.5rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
      }
      .form-floating {
        margin-bottom: 1.2rem;
      }
      .form-control {
        border-radius: 12px;
        border: 1px solid #e1e8f0;
        padding: 12px;
        font-size: 1rem;
      }
      .form-control:focus {
        box-shadow: 0 0 0 0.25rem rgba(74, 105, 189, 0.25);
      }
      .btn {
        border-radius: 12px;
        padding: 0.8rem;
        font-weight: 500;
        letter-spacing: 1px;
        font-size: 1.1rem;
      }
      .btn-primary {
        background: #4a69bd;
        border: none;
        transition: all 0.3s ease;
      }
      .btn-primary:hover {
        background: #3c5aa9;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(74, 105, 189, 0.4);
      }
      .btn-secondary {
        background: #6c757d;
        border: none;
        transition: all 0.3s ease;
      }
      .btn-secondary:hover {
        background: #5a6268;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
      }
      .divider {
        margin: 2rem 0;
        display: flex;
        align-items: center;
        text-align: center;
        color: #6c757d;
      }
      .divider::before,
      .divider::after {
        content: "";
        flex: 1;
        border-bottom: 2px solid #e1e8f0;
      }
      .divider span {
        padding: 0 1.5rem;
        font-weight: 500;
      }
      .password-requirements {
        font-size: 0.875rem;
        color: #6c757d;
        text-align: left;
        margin-top: -0.5rem;
        margin-bottom: 1.2rem;
        padding: 0.8rem 1rem;
        background: rgba(74, 105, 189, 0.05);
        border-radius: 10px;
        border: 1px solid rgba(74, 105, 189, 0.1);
      }
      .password-requirements ul {
        margin-bottom: 0;
        padding-left: 1.25rem;
      }
      .password-requirements li {
        margin: 0.3rem 0;
      }
    </style>
  </head>
  <body class="text-center">
    <main class="form-signin">
      <form id="registerForm">
        <div class="logo">
          <i class="fas fa-sign-language"></i>
        </div>
        <h1 class="h3 mb-4 fw-normal">创建新账号</h1>

        <div class="form-floating">
          <input
            type="text"
            class="form-control"
            id="username"
            placeholder="用户名"
            required
            autocomplete="username"
          />
          <label for="username"> <i class="fas fa-user me-2"></i>用户名 </label>
        </div>

        <div class="form-floating">
          <input
            type="email"
            class="form-control"
            id="email"
            placeholder="邮箱"
            required
            autocomplete="email"
          />
          <label for="email"> <i class="fas fa-envelope me-2"></i>邮箱 </label>
        </div>

        <div class="form-floating">
          <input
            type="password"
            class="form-control"
            id="password"
            placeholder="密码"
            required
            autocomplete="new-password"
          />
          <label for="password"> <i class="fas fa-lock me-2"></i>密码 </label>
        </div>

        <div class="password-requirements">
          <small>密码要求：</small>
          <ul>
            <li>至少6个字符</li>
            <li>包含字母和数字</li>
          </ul>
        </div>

        <div class="form-floating">
          <input
            type="password"
            class="form-control"
            id="confirmPassword"
            placeholder="确认密码"
            required
            autocomplete="new-password"
          />
          <label for="confirmPassword">
            <i class="fas fa-lock me-2"></i>确认密码
          </label>
        </div>

        <button class="w-100 btn btn-lg btn-primary mb-3" type="submit">
          <i class="fas fa-user-plus me-2"></i>注册
        </button>

        <div class="divider">
          <span>已有账号？</span>
        </div>

        <a href="/user/login.html" class="w-100 btn btn-lg btn-secondary">
          <i class="fas fa-sign-in-alt me-2"></i>返回登录
        </a>

        <div id="alertPlaceholder" class="mt-3"></div>

        <p class="mt-4 mb-3 text-muted">
          <i class="far fa-copyright me-1"></i>2024 星语桥·SignFlow
        </p>
      </form>
    </main>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script src="../../js/user/register.js"></script>
  </body>
</html>
